package jnpf.service;

import jnpf.mapper.EvalVerIdMapper;
import jnpf.model.StudentEvalVerId.vo.EvalVerIdVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

@Service
public class EvalVerIdService {

    @Autowired
    private EvalVerIdMapper evalVerIdMapper;

    //*评估列表
    public List<EvalVerIdVO> evalVerId(String verId) {
        List<EvalVerIdVO> evalVerIdVO = evalVerIdMapper.evalVerId(verId);
        evalVerIdVO.stream().map(vo -> {
           vo.setChildren(evalVerIdMapper.evalVerIdChildren(vo.getId()));
           return vo;
        }).collect(Collectors.toList());
        return evalVerIdVO;
    }

}
